/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.tenant.controller.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.utils.CopyUtil;
import net.siufung.market.base.tenant.mapper.entity.TenantMenu;

import java.io.Serializable;

/**
 * <p>
 * 系统菜单租户表 默认数据传参对象
 * </p>
 * @author 陈建峰
 * @since 2022-07-06 14:45:08
 */
@Slf4j
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TenantMenuDto", description="系统菜单租户表默认数据传输对象")
public class TenantMenuDto implements Serializable {

    private static final long serialVersionUID = 5003874379686627491L;

    /**
     * 菜单id
     */
    @ApiModelProperty(value = "菜单id")
    private Integer menuId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Integer tenantId;



    /**
     * 转化成数据库实体
     * @return TenantMenu
     */
    public TenantMenu to(){
        TenantMenu tenantMenu = new TenantMenu();
        CopyUtil.copyProperties(this, tenantMenu);
        return tenantMenu;
    }
}